//
//  XiuGaiXinXiCell.m
//  FactorySale
//
//  Created by 李 on 2020/1/15.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "XiuGaiXinXiCell.h"

@implementation XiuGaiXinXiCell

- (void)awakeFromNib {
    [super awakeFromNib];
      for (UITextField *textTF in self.TFCollections) {
           textTF.layer.borderColor = kColorWithHex(0xCCCCCC).CGColor;
          textTF.layer.borderWidth = 0.5;
          textTF.layer.cornerRadius = 5;
      };
    self.changJiaNameTF.delegate = self;
    self.lianXiRenTF.delegate = self;
    self.phoneTF.delegate = self;
    self.emailTF.delegate = self;
    self.shengShiQuTF.delegate = self;
    self.xiangXiDiZhiTF.delegate = self;
    
    
    self.phoneTF.enabled = NO;

    self.yzmBtn.layer.cornerRadius = 15;
    self.yzmBtn.clipsToBounds = YES;
    self.yzmBtn.hidden = YES;
    
    self.sendCodeButton = [[LMCountDownButton alloc] init];
    self.sendCodeButton.colorType = [UIColor whiteColor];
    [self.sendCodeButton setTitle:@"获取验证码" forState:UIControlStateNormal];
    [self.sendCodeButton setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    self.sendCodeButton.titleLabel.font = FontSize(13);
    self.sendCodeButton.frame = _yzmBtn.bounds;
    [self.sendCodeButton addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    self.sendCodeButton.layer.cornerRadius = 15;
    self.sendCodeButton.clipsToBounds = YES;
    self.sendCodeButton.hidden = YES;
    [self.yzmBtn addSubview:self.sendCodeButton];
    
    
}
-(void)click:(LMCountDownButton *)sender {
   
   
}
#pragma UITextFieldDelegate
- (void)textFieldEditChanged:(UITextField *)textField
{
  
   if (self.changJiaNameTFEndHandle && textField == self.changJiaNameTF) {
           self.changJiaNameTFEndHandle(textField.text);
       }
       if (self.lianXiRenTFEndHandle && textField == self.lianXiRenTF) {
           self.lianXiRenTFEndHandle(textField.text);
       }
       if (self.phoneTFEndHandle && textField == self.phoneTF) {
           self.phoneTFEndHandle(textField.text);
       }
       if (self.emailTFEndHandle && textField == self.emailTF) {
           self.emailTFEndHandle(textField.text);
       }
    if (self.xiangXiDiZhiTFEndHandle && textField == self.xiangXiDiZhiTF ) {
           self.xiangXiDiZhiTFEndHandle(textField.text);
       }
    
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
    if (self.changJiaNameTFEndHandle && textField == self.changJiaNameTF) {
           self.changJiaNameTFEndHandle(textField.text);
       }
       if (self.lianXiRenTFEndHandle && textField == self.lianXiRenTF) {
           self.lianXiRenTFEndHandle(textField.text);
       }
       if (self.phoneTFEndHandle && textField == self.phoneTF) {
           self.phoneTFEndHandle(textField.text);
       }
       if (self.emailTFEndHandle && textField == self.emailTF) {
           self.emailTFEndHandle(textField.text);
       }
    if (self.xiangXiDiZhiTFEndHandle && textField == self.xiangXiDiZhiTF ) {
           self.xiangXiDiZhiTFEndHandle(textField.text);
       }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
